package model

// User 描述用户相关信息
type User struct {
	ID uint `gorm:"primaryKey;type:int;not null"`		//主键ID
	Name string `gorm:"type:varchar(20);not null"`		//用户名
	Password string `gorm:"size:255;not null"`			//密码
	NickName string `gorm:"type:varchar(20);not null"`	//昵称
	Authentication int	`gorm:"type:int;not null"`		//权限信息
	BorrowBookId uint `gorm:"type:int;not null"`		//借阅情况对应id
}

//UserBorrow 描述了用户借阅情况，每一条记录对应着一个借阅
type UserBorrow struct {
	ID uint `gorm:"primaryKey;type:int;not null"`		//主键ID
	UserId uint `gorm:"type:int;not null"`				//用户ID
	BookId uint `gorm:"type:int;not null"`				//书籍ID
}